#pragma warning(disable:4996)
#include<stdio.h>
//sizeof与strlen
int main()
{
	//用条件操作符求两个数的最大和最小值
	int a, b;
	scanf("%d %d", &a, &b);
	int max = a > b ? a : b;
	printf("MAX=%d\n",max);
	printf("MIN=%d\n",a+b-max);
}